package cn.stylefeng.guns.modular.hx.storage.mapper;

import cn.stylefeng.guns.modular.hx.storage.entity.HxCollectionLocation;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxCollectionLocationParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxCollectionLocationResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lww
 * @since 2024-01-02
 */
public interface HxCollectionLocationMapper extends BaseMapper<HxCollectionLocation> {

    /**
     * 获取列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    List<HxCollectionLocationResult> customList(@Param("paramCondition") HxCollectionLocationParam paramCondition);

    /**
     * 获取map列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HxCollectionLocationParam paramCondition);

    HxCollectionLocationResult findByLocationResult(@Param("paramCondition") HxCollectionLocationParam paramCondition);

    int updateByStockPort(@Param("paramCondition") HxCollectionLocationParam paramCondition);

    int updateByStockPortNull(@Param("paramCondition") HxCollectionLocationParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    Page<HxCollectionLocationResult> customPageList(@Param("page") Page page,@Param("paramCondition") HxCollectionLocationParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author lww
     * @Date 2024-01-02
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HxCollectionLocationParam paramCondition);

    List<HxCollectionLocationResult> findLocation(@Param("paramCondition") HxCollectionLocationParam hxCollectionLocationParam);

    List<HxCollectionLocationResult> getStockPortByUnit(@Param("paramCondition") HxCollectionLocationParam hxCollectionLocationParam);

    void deliveryTray(@Param("paramCondition")HxCollectionLocationParam hxCollectionLocationParam);

    void clear(@Param("paramCondition")HxCollectionLocationParam hxCollectionLocationParam);

    List<HxCollectionLocationResult> find(@Param("paramCondition")HxCollectionLocationParam hxCollectionLocationParam, @Param("condition") String condition);
}
